﻿package com.teaphy.coroutinecrawler.job

import kotlinx.coroutines.*


fun main() = runBlocking {
    println("start")

    val job1 = launch() {
        println("coroutine1 start -->")
        delay(2000)
        println("coroutine1 --> end ")
    }

    val job2 = launch(start = CoroutineStart.LAZY) {
        println("coroutine2 start -->")
        delay(2000)
        println("coroutine2 --> end ")
    }

    delay(3000)

    val start1 = job1.start()
    val start2 = job2.start()

    println("start1: $start1")
    println("start2: $start2")

    println("end")
}